home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!txwang
- From: Wang TianXing <gztxwang@public1.guangzhou.gd.cn>
- Newsgroups: comp.lang.c++
- Subject: Re: fastest code
- Date: Fri, 12 Apr 1996 06:25:32 GMT
- Message-ID: <199604120625.OAA23465@public1.guangzhou.gd.cn>
- X-NNTP-Posting-Host: txwang
- X-Newsreader: Forte Free Agent 1.0.82
- X-Mail2News-Path: public1.guangzhou.gd.cn!txwang
-
- I wrote:
- > Someone wrote:
- >
- > | void test(int& x) {
- > | if (!(x==0))
- > | x=x+1;
- > | }
-
- > I'd prefer a compiler that could generate:
-
- > test@i:
- > cmp [eax], 1
- > sbb [eax], -1
- > ret
-
- I would NOT prefer that one! That I prefer is that can generate
- something similar to:
-
- test@i:
- cmp dword ptr [eax], 1
- sbb dword ptr [eax], -1
- ret
-
- You've got the idea. Some of Microsoft's seem to do some similar
- things to intrinsic functions. Which compilers can do this to my own
- functions? :)
-
- --
- Wang TianXing
-
-
-